import { defineComponent } from 'vue'
import { useFlowState } from '../hooks/useFlowState'

export default defineComponent({
  name: 'FlowConfig',
  setup () {
    const { state } = useFlowState()
    /* render 函数 */
    return () => {
      const flow = state.flow
      return (
        <a-form class="p-1" layout="vertical" model={ flow }>
          <a-form-item label="流程ID">{ flow.id }</a-form-item>
          <a-form-item label="流程名称">
            <a-input v-model={[flow.name, 'value']} />
          </a-form-item>
        </a-form>
      )
    }
  }
})
